// 企业人员关联学生接口
let studentReleasableListUrl = 'ido/app/task/worker/students'
let studentRelateUrl = 'ido/app/task/worker/student/'
let studentRelatedUrl = 'ido/app/task/worker/students/list'

function relateStudentApi(vm) {
	// 获取已关联学生列表
	let getRelatedStudentList = () => vm.$u.get(studentRelatedUrl)
	// 获取可关联学生列表
	let getReleasableStudentList = () => vm.$u.get(studentReleasableListUrl)
	// 通过学生的学生ID关联学生
	let relateStudent = (id) => vm.$u.post(studentRelateUrl + id)
	// 通过学生的学生ID来取消关联学生
	let cancelRelateStudent = (id) => vm.$u.delete(studentRelateUrl + id)
	return {getRelatedStudentList,getReleasableStudentList,relateStudent,cancelRelateStudent}
}
export default relateStudentApi